Address energy outside of an HVAC season or during unavailable period#2151
Address energy outside of an HVAC season or during unavailable period#2151
Conversation
…riods in defrost, pan, and crankcase ems programs.
…HPXML into address-crankcase-defrost-pan-warning # Conflicts: # HPXMLtoOpenStudio/measure.xml # ReportSimulationOutput/measure.xml # workflow/tests/base_results/results_simulations_misc.csv
…HPXML into address-crankcase-defrost-pan-warning # Conflicts: # HPXMLtoOpenStudio/measure.xml # ReportSimulationOutput/measure.xml # workflow/tests/base_results/results_simulations_misc.csv
shorowit
left a comment
There was a problem hiding this comment.
This all looks pretty good in general. I ran some tests manually and results were as expected. I did have just a few small questions/comments:
| program.addLine("ElseIf T_out < #{min_oat_compressor}") | ||
| program.addLine(" Set #{crankcase_heater_energy_oe_act.name} = #{heat_pump.crankcase_heater_watts}") |
There was a problem hiding this comment.
I'm not immediately understanding why this ElseIf is needed (and why it doesn't use the htg/clg availability sensors like above). Can you explain?
There was a problem hiding this comment.
There was a problem hiding this comment.
Yes, I was missing the htg/clg availability sensors on the compressor lockout ElseIf line. Good catch. 031529b
There was a problem hiding this comment.
I changed the program here to avoid the possibility of inconsistent logic between the two paths. The program felt more complicated than it needed to be. Now it makes more sense to me.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR addresses #2149 by modeling heat pump crankcase heater energy via EMS so it can be disabled during power outages/unavailable periods, and updates sample files, documentation, and test baselines accordingly.
Changes:
- Adds EMS-based crankcase heater energy modeling and updates reporting to attribute it to heating vs cooling end uses.
- Updates/extends workflow sample files and baseline results for new “power outage” and “hvac seasons” scenarios.
- Removes/updates warnings/documentation that previously stated HVAC energy couldn’t be eliminated during unavailable periods/outside seasons.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
HPXMLtoOpenStudio/resources/hvac.rb |
Implements EMS crankcase heater modeling and removes direct E+ crankcase heater configuration. |
HPXMLtoOpenStudio/resources/output.rb |
Routes crankcase heater energy reporting through EMS “OtherEquipment” and updates API usage. |
HPXMLtoOpenStudio/tests/test_hvac.rb |
Expands heat pump defrost/pan heater test to also validate crankcase heater EMS. |
HPXMLtoOpenStudio/resources/schedules.rb + docs/source/workflow_inputs.rst |
Removes/adjusts warnings/docs now that EMS can eliminate HVAC crankcase energy in unavailable periods. |
workflow/sample_files/*.xml + workflow/tests/base_results/*.csv |
Adds scenarios and updates baselines to reflect new behavior. |
ReportSimulationOutput/measure.rb |
Ensures EMS lag adjustment also applies to crankcase heater “OtherEquipment”. |
Comments suppressed due to low confidence (2)
HPXMLtoOpenStudio/resources/hvac.rb:5310
- The unit-multiplier scaling for
crankcase_heater_wattswas removed for both cooling systems and heat pumps, but crankcase heater power is still used to drive EMS “OtherEquipment” power (hvac_system.crankcase_heater_watts). This will under-scale crankcase heater energy in multifamily/unit-multiplier runs. Add back scaling of*_sys.crankcase_heater_wattshere (or alternatively, scale insideapply_crankcase_heater_ems_programusingnumber_of_units/unit multiplier) so results remain consistent with other HVAC power terms.
def self.apply_unit_multiplier(hpxml_bldg, hpxml_header)
HPXMLtoOpenStudio/resources/hvac.rb:4990
apply_defrost_ems_programnow assumes an outdoor drybulb EMS sensor already exists (and is tagged viaadditionalProperties), but it doesn’t create the sensor or validate thattout_db_sensorwas found before later using it. This creates a hidden coupling to the call site and can fail at runtime if the sensor wasn’t created (e.g., if the function is reused from another code path). Consider either (a) creating the sensor here when not found, or (b) raising a clear error iftout_db_sensoris nil with guidance on the required setup.
)
# Sensors
tout_db_sensor = model.getEnergyManagementSystemSensors.find { |s| s.additionalProperties.getFeatureAsString('ObjectType').to_s == Constants::ObjectTypeOATDrybulbSensor }
htg_coil_rtf_sensor = Model.add_ems_sensor(
model,
name: "#{htg_coil.name} rtf s",
output_var_or_meter_name: 'Heating Coil Runtime Fraction',
key_name: htg_coil.name
)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…HPXML into address-crankcase-defrost-pan-warning # Conflicts: # HPXMLtoOpenStudio/measure.xml
…HPXML into address-crankcase-defrost-pan-warning # Conflicts: # HPXMLtoOpenStudio/measure.xml # workflow/tests/base_results/results_simulations_bills.csv # workflow/tests/base_results/results_simulations_energy.csv # workflow/tests/base_results/results_simulations_loads.csv # workflow/tests/base_results/results_simulations_misc.csv
…EL/OpenStudio-HPXML into address-crankcase-defrost-pan-warning
…HPXML into address-crankcase-defrost-pan-warning # Conflicts: # HPXMLtoOpenStudio/measure.xml

Pull Request Description
Addresses #2149, model the crankcase heater via EMS so that it can be disabled during power outages.
Checklist
Not all may apply:
EPvalidator.sch) has been updatedopenstudio tasks.rb update_hpxmls)HPXMLtoOpenStudio/tests/test*.rband/orworkflow/tests/test*.rb)openstudio tasks.rb update_measureshas been run